package com.cc.mall.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cc.mall.entity.ProductDetailEntity;
import com.cc.mall.entity.ProductEntity;
import com.cc.mall.vo.IdAndNumVo;
import com.cc.mall.vo.ProductDetail;
import com.cc.mall.vo.ProductDetailVo;
import com.cc.mall.vo.ProductVo;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 
 *
 * @author leifengyang
 * @email leifengyang@gmail.com
 * @date 2020-12-09 20:57:52
 */
public interface ProductService extends IService<ProductEntity> {

    Page<ProductEntity> pageWithCondition(Map<String, Object> params);

    void up(Long id);

    Page<ProductDetailEntity> getProductDetailListById(Map<String,Object> params);

    void removeByProductId(Long id);

    List<ProductVo> getProductListByCatId(Long catId);

    void down(Long id);

    ProductDetailVo getProductBySkuId(Long skuId,Long spuId) throws ExecutionException, InterruptedException;

    List<ProductDetail> getProductDetailBySpuId(Long spuId);

    List<IdAndNumVo> getSpuIdAndNumList();

    ProductEntity getByIdP(Long id);
}

